package com.sgg.gulimall_third_part.controller;

import com.aliyun.oss.OSSClient;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.model.MatchMode;
import com.aliyun.oss.model.PolicyConditions;
import com.sgg.gulimall_common.api.Result;
import com.sgg.gulimall_third_part.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author fileworld
 * @create 2021/9/30 0030
 * @project base_spring_cloud
 * @description
 */
@RestController
@RequestMapping("/OSS")
public class UploadOSSController {

  @Autowired private OssService ossService;

  @GetMapping("/signature")
  public Result uploadOSS() {

    Map<String, String> signature = ossService.Signature();
    return Result.success(signature);
  }

  @GetMapping("/callback")
  public Result callbackResult(){
    return Result.success("sdasd");
  }
}
